package com.ibm.risk.irmp.base.service.client.config;


import com.ibm.risk.irmp.base.service.client.ConfigServiceClient;
import com.ibm.risk.irmp.base.service.client.DataDictBaseServiceClient;
import com.ibm.risk.irmp.base.service.client.SeqServiceClient;
import com.ibm.risk.irmp.base.service.client.UserBaseServiceClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.service.invoker.HttpServiceProxyFactory;

@Configuration
public class BaseClientConfig extends AbstractBaseClientConfig {

    @Bean
    public ConfigServiceClient configServiceClient(){
        HttpServiceProxyFactory factory = getHttpServiceProxyFactory();
        return factory.createClient(ConfigServiceClient.class);
    }

    @Bean
    public UserBaseServiceClient userBaseServiceClient(){
        HttpServiceProxyFactory factory = getHttpServiceProxyFactory();
        return factory.createClient(UserBaseServiceClient.class);
    }

    @Bean
    public DataDictBaseServiceClient dataDictBaseServiceClient(){
        HttpServiceProxyFactory factory = getHttpServiceProxyFactory();
        return factory.createClient(DataDictBaseServiceClient.class);
    }

    @Bean
    public SeqServiceClient seqServiceClient(){
        HttpServiceProxyFactory factory = getHttpServiceProxyFactory();
        return factory.createClient(SeqServiceClient.class);
    }
}
